
fetch("http://localhost:3000/personalized",{
    method:"GET",
    mode:"cors"
})
    .then(function(r){
        return r.json();
    })
    .then(data=>{
        let string=""
        data.result.slice(0,6).forEach(value=>{
            let lisNum=''
            if(value.playCount>9999){
                lisNum=(value.playCount/10000).toFixed(1)+'万'
            }
           if(value.playCount>99999999){
                lisNum=(value.playCount/100000000).toFixed(1)+'亿'
            }
            string+=
                `
        <a href="songlist.html?id=${value.id}">
        <li>
            <span>${lisNum}</span>
            <img src="${value.picUrl}" alt="">
            <p>${value.name}</p>
         </li>
         </a>
        `
        })
        $(".recommend_song>ul").innerHTML=string
    })